//
//  connect.m
//  ttsdktestapp
//
//  Created by wangna on 14-12-25.
//  Copyright (c) 2014年 wangna. All rights reserved.
//

#import "connect.h"
//#import "../../ttsdk/ttsdk/connect.h"
//
//@interface SDKConnect()<ConnectDelegate>
//{
//    Connect  * _connect;
//    id<SDKConnectDelegate> _theDelegate;
//}
//@end

@implementation SDKConnect

//- (id)initWithObj:(id)connect
//{
//    self = [super init];
//    if (self) {
//        // Initialization code here.
//        _connect = connect;
//        [_connect addRef];
//        [_connect setCallback];
//        [_connect setDelegate:self];
//    }
//    
//    return self;
//}
//
//- (void)setDelegate:(id)delegate
//{
//    assert(delegate != NULL);
//    if (delegate != NULL)
//    {
//        _theDelegate = delegate;
//    }
//    else
//    {
//        _theDelegate = nil;
//    }
//}
//
//- (bool) doLogin:(uint64_t) userid token:(NSString *)token srcid:(uint32_t)srcid
//{
//    return [_connect login:userid token:token srcid:srcid];
//}
//
//- (BOOL) createGroup
//{
//    return [_connect createGroup];
//}
//
//- (BOOL) joinGroup:(uint64_t)groupid
//{
//    return [_connect joinGroup:groupid];
//}
//
//- (BOOL) exitGroup:(uint64_t)groupid
//{
//    return [_connect exitGroup:groupid];
//}
//
////ConnectDelegate
//- (uint32_t) getAccType
//{
//    return 0;
//}
//
//- (NSString *) getAccount
//{
//    return @"18621603270";
//}
//
//- (NSString *) getPasswd
//{
//    return @"Auona518";
//}
//
//- (uint8_t) getNetType
//{
//    return 3;
//}
//
//- (uint8_t) getOsType
//{
//    return 1;
//}
//
//- (BOOL) getNewUserFlag
//{
//    return false;
//}
//
//- (uint32_t) getClientVersion
//{
//    return 80025153;
//}
//
//- (uint32_t) getSourceType
//{
//    return 0;
//}
//
//- (NSString *) getLoginInfo
//{
//    return @"iphone6";
//}
//
//- (NSString *) getNetInfo
//{
//    return @"wifi";
//}
//
//- (uint64_t) getCallId
//{
//    return 0;
//}
//
//- (uint64_t) getPhoneId
//{
//    return 18621603270;
//}
//
//- (uint64_t) getImid
//{
//    return 60002836;
//}
//
//- (uint64_t) getDev1
//{
//    return 0;
//}
//
//- (uint64_t) getDev2
//{
//    return 0;
//}
//
//- (void) onLogin:(int32_t)result owner:(Owner *)owner
//{
//    if (result == 0 && owner) {
//       _sdk_owner = [[SDKOwner alloc] initWithObj:owner];
//    }
//    
//    [_theDelegate onLogin:result];
//}
//
//- (void) onCreateGroup:(int32_t)result group:(Group *)group stream_enable:(BOOL)stream_enable
//{
//    SDKGroup * sdk_group = nil;
//    if (result == 0) {
//        sdk_group = [[SDKGroup alloc] initWithObj:group];
//        //加入owner中
//        [_sdk_owner addGroup:sdk_group];
//    }
//    
//    [_theDelegate onCreateGroup:result group:sdk_group];
//}
//
//- (void) onJoinGroup:(int32_t)result group:(Group *)group stream_enable:(BOOL)stream_enable
//{
//    SDKGroup * sdk_group = nil;
//    if (result == 0) {
//        sdk_group = [[SDKGroup alloc] initWithObj:group];
//        //加入owner中
//        [_sdk_owner addGroup:sdk_group];
//    }
//    
//    [_theDelegate onJoinGroup:result group:sdk_group];
//
//}
//
//- (void) onExitGroup:(int32_t)result groupid:(uint64_t)groupid
//{
//    if (result == 0) {
//        [_sdk_owner delGroup:groupid];
//    }
//    [_theDelegate  onExitGroup:result groupid:groupid];
//}

@end
